import jmespath


class Grammar:

    def goods_id(self):
        return "data.data[0].goods_id"
    def goods_sku_id(self):
        return "data.data[0].goodsSku.sku_id"


def extract(grammar_use,data):
    return jmespath.search(grammar_use, data)


# def grammar():
#     return "data.data[0].goods_id"
#
#
# def extract(data):
#     jmespath.search(grammar(), data)
#     return
